const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

mix.js('resources/js/foundation.js', 'public/js')
    .sass('resources/sass/foundation.scss', 'public/css');


mix.scripts([
    'resources/js/gpg.js',
    'resources/js/gpg-key.js'], 'public/js/gpg.js');

mix.scripts(
    'resources/js/login-form.js', 'public/js/login.js');
mix.js('resources/js/loader.js', 'public/js');
mix.scripts(
    ['resources/js/dash/core/jquery.min.js',
        'resources/js/dash/core/popper.min.js',
        'resources/js/dash/core/bootstrap-material-design.min.js',
        'resources/js/dash/plugins/perfect-scrollbar.jquery.min.js',
        'resources/js/dash/plugins/moment.min.js',
        'resources/js/dash/plugins/sweetalert2.js',
        'resources/js/dash/plugins/jquery.validate.min.js',
        'resources/js/dash/plugins/jquery.bootstrap-wizard.js',
        'resources/js/dash/plugins/bootstrap-selectpicker.js',
        'resources/js/dash/plugins/bootstrap-datetimepicker.min.js',
        'resources/js/dash/plugins/jquery.dataTables.min.js',
        'resources/js/dash/plugins/bootstrap-tagsinput.js',
        'resources/js/dash/plugins/jasny-bootstrap.min.js',
        'resources/js/dash/plugins/fullcalendar.min.js',
        'resources/js/dash/plugins/jquery-jvectormap.js',
        'resources/js/dash/plugins/nouislider.min.js',
        'resources/js/dash/plugins/core.js',
        'resources/js/dash/plugins/arrive.min.js',
        'resources/js/dash/plugins/chartist.min.js',
        'resources/js/dash/material-dashboard.js'], 'public/js/material.js')
    .styles(
        ['resources/css/dash/material-dashboard.css',
            'resources/css/dash/demo.css'], 'public/css/dashboard.css');

//mix.js('resources/js/P2P-CDN.js', 'public/js');

mix.js('resources/js/crypto-js.js', 'public/js');

mix.copyDirectory('resources/img', 'public/img');

if (mix.inProduction()) {
    mix.version()
        .sourceMaps();
}